#钱
money=int(input("请输入价格："))
#会员
vip=input("请输入是否是会员：是/否")
#答案1
if vip=="是":
    if money>=100:
        money-=50
    elif money>=50:
        money-=20
    elif money >=30:
        money -= 10
    money*=0.8
else:
    if money>=100:
        money-=50
    elif money>=50:
        money-=20
    elif money >=30:
        money -= 10
print(money)

#答案2
if money>=100:
    money-=50
elif money>=50:
    money-=20
elif money >=30:
    money -= 10
if vip=="是":
    money*=0.8
print(money)